import Vue from 'vue'
import Router from 'vue-router'
import ARSocial from '../pages/ARSocial'
import PersonalCenter from '../pages/PersonalCenter'
import PhotoWall from '../pages/PhotoWall'
import Landing from '../pages/Landing.vue'
import Home from '../pages/Home.vue'
import PersonalData from '../pages/PersonalData.vue'
import MyFans from '../pages/MyFans.vue'
import MyConcerned from '../pages/MyConcerned.vue'
import RatingList from '../pages/RatingList.vue'
import MyVisitors from '../pages/MyVisitors.vue'
import SecretInfo from '../pages/SecretInfo.vue'
import MyWallet from '../pages/wallet/MyWallet.vue'
import WalletBalance from '../pages/wallet/WalletBalance.vue'
import FriendFund from '../pages/wallet/FriendFund.vue'
import BalanceDetail from '../pages/wallet/BalanceDetail.vue'
import FundDetail from '../pages/wallet/FundDetail.vue'
import BalanceRecharge from '../pages/wallet/BalanceRecharge.vue'
import BalanceWithdraw from '../pages/wallet/BalanceWithdraw.vue'
import FundWithdraw from '../pages/wallet/FundWithdraw.vue'
import MyEvaluates from '../pages/MyEvaluates.vue'
import UserInformation from '../pages/UserInformation.vue'
import InterestTagManage from '../pages/InterestTagManage.vue'
import MakeEvaluation from '../pages/MakeEvaluation.vue'
import UpdateAvatar from '../pages/UpdateAvatar.vue'
import PhotoUserInfo from '../pages/PhotoUserInfo.vue'
import Selfie from '../pages/Selfie.vue'
import InputSecretSignal from '../pages/InputSecretSignal.vue'
import SelfieManage from '../pages/SelfieManage.vue'
import ViewImage from '../pages/ViewImage.vue'
import Login from '../pages/Login.vue'
import TestRoat from '../pages/TestRoat.vue'
import TermsOfService from '../pages/TermsOfService.vue'


Vue.use(Router)

export default new Router({
  routes: [{
      path: '/home',
      name: 'Home',
      component: Home,
      meta: {
        keepAlive: true
      },
      children: [{ //子路由不能用 / 开头，用 / 开头的表示根路由
          path: 'arsocial',
          name: 'ARSocial',
          component: ARSocial,
          meta: {
            keepAlive: true
          }
        },
        {
          path: 'personalcenter',
          name: 'PersonalCenter',
          component: PersonalCenter,
          meta: {
            keepAlive: true
          }
        },
        {
          path: 'photowall',
          name: 'PhotoWall',
          component: PhotoWall,
          meta: {
            keepAlive: true
          }
        }
      ]
    },

    {
      path: '/personaldata',
      name: 'PersonalData',
      component: PersonalData
    },
    {
      path: '/interesttagmanage',
      name: 'InterestTagManage',
      component: InterestTagManage
    },
    {
      path: '/selfiemanage',
      name: 'SelfieManage',
      component: SelfieManage
    },
    {
      path: '/viewimage',
      name: 'ViewImage',
      component: ViewImage
    },
    {
      path: '/myfans',
      name: 'MyFans',
      component: MyFans
    },
    {
      path: '/myconcerned',
      name: 'MyConcerned',
      component: MyConcerned
    },
    {
      path: '/ratinglist',
      name: 'RatingList',
      component: RatingList
    },
    {
      path: '/myvisitors',
      name: 'MyVisitors',
      component: MyVisitors
    },
    {
      path: '/mywallet',
      name: 'MyWallet',
      component: MyWallet
    },
    {
      path: '/myevaluates',
      name: 'MyEvaluates',
      component: MyEvaluates
    },
    {
      path: '/secretinfo',
      name: 'SecretInfo',
      component: SecretInfo
    },
    {
      path: '/walletbalance',
      name: 'WalletBalance',
      component: WalletBalance
    },
    {
      path: '/friendfund',
      name: 'FriendFund',
      component: FriendFund
    },
    {
      path: '/balancedetail',
      name: 'BalanceDetail',
      component: BalanceDetail
    },
    {
      path: '/funddetail',
      name: 'FundDetail',
      component: FundDetail
    },
    {
      path: '/balancerecharge',
      name: 'BalanceRecharge',
      component: BalanceRecharge
    },
    {
      path: '/balancewithdraw',
      name: 'BalanceWithdraw',
      component: BalanceWithdraw
    },
    {
      path: '/fundwithdraw',
      name: 'FundWithdraw',
      component: FundWithdraw
    },
    {
      path: '/photouserInfo/:accountId',
      name: 'PhotoUserInfo',
      component: PhotoUserInfo
    },
    {
      path: '/userinformation/:accountId',
      name: 'UserInformation',
      component: UserInformation
    },
    {
      path: '/makeevaluation/:accountId',
      name: 'MakeEvaluation',
      component: MakeEvaluation
    },
    {
      path: '/updateavatar',
      name: 'UpdateAvatar',
      component: UpdateAvatar
    },
    {
      path: '/selfie',
      name: 'Selfie',
      component: Selfie
    },
    {
      path: '/inputsecretsignal',
      name: 'InputSecretSignal',
      component: InputSecretSignal
    },
    {
      path: '/termsofservice',
      name: 'TermsOfService',
      component: TermsOfService
    },

    {
      path: '/testroat',
      name: 'TestRoat',
      component: TestRoat
    },

    {
      path: '/login',
      name: 'Login',
      component: Login,
      meta: {
        auth: false
      }
    },

    // {
    //   path: '/',
    //   name: 'Landing',
    //   component: Landing
    // }
    {
      path: '/',
      redirect: '/login'
    }
  ]
})
